clf
hold on

zeroone=0

if zeroone
    x0=0
    x1=1
else
    x0=1.1
    x1=10
end
%a1 = x0:(x1-x0)/10:x1;

g=x0:(x1-x0)/1000:x1;

%for a1=.4
%g=1.5

%plot(a1, -(4/(-2 + g)),'g')
%plot(a1, (2*(2 - 2*g - sqrt(-g^2 + g^3)))/(4 - 4*g + g^2),'b')
%a1 = -(4./(-2 + g));
a1 = (2*(2 - 2*g - sqrt(-g.^2 + g.^3)))./(4 - 4*g + g.^2)

%afrom3bids = (-4 - g + sqrt(16*g + g.^2))./(-4 + 2*g);

%a1 = (2*(2 - 2*g + sqrt(-g.^2 + g.^3)))./(4 - 4*g + g.^2);
plot(g, a1, 'm')
a2 = (4 - 6*a1 + 2*a1.^2 - (a1.^2).*g)./(2 - 2*a1 + a1.*g);
%plot(g,a2,'k')
%plot(g,afrom3bids,'b')

[g' a1' a2']

%plot([x0 x1], [0 0], 'r')
%plot([x0 x1], [1 1], 'r')
%plot([x0 x1], [x0 x1], 'r')
%end

name = strcat('../cap/graphs/zeroone',sprintf('%d',zeroone))
%print('-depsc',strcat(name, '.eps'));
%print('-dpdf',strcat(name, '.pdf'));